package com.xuz.controller;

import com.xuz.framework.context.support.ClassPathXmlApplicationContext;
import com.xuz.service.CourseService;

/**
 * @user 65453
 * @date 2024/10/24 22:09
 */
public class CourseController {
    public static void main(String[] args) {
        //1.创建Spring的容器对象
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        //2.从容器对象中获取CourseService对象
        CourseService courseService = context.getBean("courseService", CourseService.class);

        //3.调用UserService的add方法
        courseService.add();
    }
}
